1. Field of the Invention
The present invention relates to a recording apparatus, a recording method, a program of the recording method, and a recording medium having the program of the recording method recorded thereon. The invention is applicable to a portable record/playback apparatus for recording video and audio data on a random access recording medium or the like. The invention allows a multiplexed stream to be recorded in such a manner that the position of an editable boundary can be detected more quickly than previously possible by recording positional information on an editable point on the recording medium.
2. Description of the Related Art
In the past, for portable video camcorders and the like, video and audio data have been compressed in accordance with the MPEG (Moving Picture Experts Group) method, and interleaved and multiplexed for recording on a recording medium.
In the MPEG method, as shown in FIG. 4, consecutive frames are sequentially divided to form GOPs (Group Of Pictures) such that each GOP includes a predetermined number of frames and the first frame of each GOP is assigned as an I picture. In the MPEG method, the I picture is compressed by intra-frame coding. The remaining frames of the GOP are assigned as P and B pictures, which are compressed by inter-frame coding in which the I picture of the GOP is assigned as a prediction frame, as well as by another type of inter-frame coding in which a P picture that is coded by the I picture as a prediction frame is further assigned as a prediction frame. In this way, the video data is encoded on a GOP basis.
On the other hand, audio data is sequentially divided in accordance with the AAC (Advanced Audio Codec) method to form audio access units (AAU), as shown in FIG. 5C, such that each AAU is formed of a time section that corresponds to a GOP, and compressed on an audio access unit basis.
In video camcorders of related art, as shown in FIG. 5, streaming data ST1 of the video data and streaming data ST2 of the audio data thus compressed and created are each packeted using the predetermined time sections, and these packets are time multiplexed to form multiplexed stream ST3 by interleaving the streaming data ST1 of the video data and streaming data ST2 of the audio data. Thereafter, the multiplexed stream ST3 is recorded on a recording medium.
Since the streaming data ST1 of the video data in the MPEG format is compressed on a GOP basis, if a GOP is edited at some midpoint within the GOP and P and B pictures are separated from the I picture, where those I, P and B pictures as a whole form one GOP, it is difficult to decode these P and B pictures. Accordingly, the streaming data ST1 of the video data in the MPEG format needs to be edited at a boundary between GOPs.
Since streaming data ST2 of the audio data is also compressed on an audio access unit basis, if an audio access unit is edited at some midpoint within the audio access unit, it is difficult to decode the audio access unit. Accordingly, the streaming data ST2 of the audio data needs to be edited at a boundary between audio access units.
Accordingly, when the multiplexed stream ST3 recorded on the recording medium is edited, a point that is not only a boundary between GOPs but also a boundary between audio access units is where the multiplexed stream can be edited in such a manner that streaming data that form the multiplexed stream can be correctly decoded (hereinafter referred to as “editable point”). If the multiplexed stream is edited at a point other than editable points, at least one of the video data and audio data cannot be correctly decoded. Therefore, in video camcorders of the related art, a multiplexed stream recorded on the recording medium is edited by assigning a point that is not only a boundary between GOPs but also a boundary between audio access units as an editable point.
With regard to the recording of such multiplexed streams, JP-A-2004-79087 proposes a method in which the recording is carried out by setting the start of a GOP to the start of a cluster on a recording medium to allow quick editable point detection.
To detect such an editable point, it may be required to actually play back the multiplexed stream recorded on the recording medium, analyze the streaming data and detect a boundary. To divide a file formed of such a multiplexed stream, it may be required to detect such a boundary, taking into account the time elapsed from the start of the file. Furthermore, since the positional relationship between the interleaved video and audio data packets may be different depending on recording devices to be used, detection of a boundary also involves taking into account such a positional relationship between the packets.
Although the method disclosed in JP-A-2004-79087 can be thus applied to detect a multiplexed stream in order to reduce the time that may be required for boundary detection, the speed at which such an editable point is detected is still practically insufficient.